home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir42 / bbdo43.zip / CUSTOM.PRG < prev    next >
Text File  |  1994-02-27  |  3KB  |  54 lines

  1. *****************************************************************************
  2. **-- Copyright 1993 B&B Systems                                             *
  3. **-- You can modify this file anyway you want                               *
  4. **-- After making ANY changes here, this file needs to be compiled with     *
  5. **-- FoxPro, or started with FOXPRO to make an .FXP file.                   *
  6. *****************************************************************************
  7.  
  8. **-- SAMPLE #1
  9. **-- The line below will search for a data base file called
  10. **-- Product.dbf, after entering <CTRL-F2>.  If found it will be displayed
  11. **-- on the screen.  
  12. ON KEY LABEL CTRL+F2 DO filelook WITH 'PRODUCT',.t.,.t.
  13.  
  14.  
  15.  
  16.  
  17. **-- Sample #2
  18. **-- Use this to move data with one keystroke while in the browse screen.
  19. **-- the sample below will move data from a FIELD Called ACTIVITY1 (used 
  20. **-- to insert activity codes) to another field called ACTIVITY2, and
  21. **-- move whatever information that was in ACTIVITY2 to ACTIVITY3. 
  22. **-- This assumes that your data base has threee fields called ACTIVITY1,
  23. **-- ACTIVITY2, and ACTIVITY3.
  24. **-- Note: if you insert the key word ALL after REPLACE, all records
  25. **-- in the data file would be changed.
  26. **-- ON KEY LABEL CTRL+F3 REPLACE ACTIVITY3 WITH ACTIVITY2, ACTIVITY2 WITH ACTIVITY1  
  27.  
  28.  
  29. **-- Sample #3
  30. **-- Take the asterisk off the line below if you have a 1) REP (Sales 
  31. **-- Representative) file, 2) a field called REP for a sales rep code
  32. **-- in your main data file, and 3) you want to access the proper REP Name/
  33. **-- Phone number, etc. in Reports, Labels, Letters with this 
  34. **-- variable name:<<REP->repname>>, <<REP->repphone>>
  35. IF file00='SAMPLE'               &&name of your master file - You only want to call this when your using a file containing REP
  36.    IF FILE('REP.DBF')
  37.    =g_opnfl('REP','REP',.f.,.f.)  &&This line opens a file  .f.=don't open exclusively, .f.=don't open again (if already open)
  38.    SET ORDER TO TAG rep
  39.    SELECT &file00
  40.    SET RELATION TO rep INTO REP
  41.    ENDIF
  42. ENDIF
  43.  
  44. **-- Sample #4 (Same as #3, but uses state.dbf file)
  45. **-- Allows use of Illinois instead of IL, or Wisconsin instead of WI <<STATE->desc>>.
  46. **-- or access to county names with <<STATE->county>>
  47. *IF file00='SAMPLE'               &&name of your master file - You only want to call this when your using a file containing STATE
  48.    *IF FILE('STATE.DBF')
  49.    *=g_opnfl('STATE','STATE',.f.,.f.)
  50.    *SET ORDER TO TAG state
  51.    *SELECT &file00
  52.    *SET RELATION TO state INTO STATE
  53.    *ENDIF
  54. *ENDIF